package test;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import Dao.UserDao;
import aop.Mp3;
import entiy.Person;

public class Main {
	
	@Test
	public void test() {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"applicationContext.xml"});
		BeanFactory factory = context.getBeanFactory();
		Mp3 bean = (Mp3) factory.getBean("mp3");
		/*Person bean2 = (Person) factory.getBean("children");
		UserDao bean3 = (UserDao) factory.getBean("children");*/
		bean.play();
		context.close();
	}

}
